﻿/*----------------------------------------------------------------
//  <copyright file="QQDefaults.cs" company="MicroCloud@151504200868">
//      Copyright © 2020-2024 MicroCloud Corporation, All rights reserved.
//  </copyright>
//  <site>https://gitee.com/chenmm123/microclouds</site>
//  <last-editor>cmm</last-editor>
//  <last-date>2022-11-15 14:39</last-date>
//----------------------------------------------------------------*/

namespace MicroCloud.Authentication.OAuth2.QQ
{
    #region "QQ认证使用的默认值"
    /// <summary>
    /// QQ认证使用的默认值
    /// http://wiki.connect.qq.com/%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C_oauth2-0 QQ互联 oauth2.0文档
    /// </summary>
    public static class QQDefaults
    {
        /// <summary>
        /// 权限标记
        /// </summary>
        public const string AuthenticationScheme = "QQ";

        /// <summary>
        /// 显示名称
        /// </summary>
        public const string DisplayName = "QQ";

        /// <summary>
        /// 应用程序基本路径中的请求路径，用户代理将在其中返回。中间件将在该请求到达时处理它。
        /// <see cref="RemoteAuthenticationOptions.CallbackPath"/>
        /// </summary>
        public const string CallbackPath = "/signin-qq";

        /// <summary>
        /// 应用于创建的任何声明的颁发者
        /// <see cref="AuthenticationSchemeOptions.ClaimsIssuer"/>
        /// </summary>
        public const string Issuer = "qq";

        /// <summary>
        /// 获取用户个人信息授权作用域
        /// </summary>
        public const string get_user_info = "get_user_info";

        /// <summary>
        /// 获取Authorization Code
        /// </summary>
        public const string AuthorizationEndpoint = "https://graph.qq.com/oauth2.0/authorize";

        /// <summary>
        /// 通过Authorization Code获取Access Token
        /// </summary>
        public const string TokenEndpoint = "https://graph.qq.com/oauth2.0/token";

        /// <summary>
        /// 通过获取的Access Token，得到对应用户身份的OpenID
        /// </summary>
        public const string OpenIdEndpoint = "https://graph.qq.com/oauth2.0/me";

        /// <summary>
        /// 获取到Access Token和OpenID后，可通过调用OpenAPI来获取或修改用户个人信息
        /// </summary>
        public const string UserInformationEndpoint = "https://graph.qq.com/user/get_user_info";

    }
    #endregion

}
